/*
 * Created: 2022-08-27 08:03:34
 * Author : 涛涛涛
 */

import React, { FC, useContext } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { ProductExhibitionContext } from '@/pages/ProductExhibition/ProductExhibitionContext';
export interface IProps extends ICompProps {}
Headline.defaultProps = {} as Partial<IProps>;
function Headline(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('Headline', className);
    const { Operation, product } = useContext(ProductExhibitionContext);
    return (
        <RootView className={localClassName} style={style}>
            <View className="title">{product.artwork.name}</View>
            {Operation}
        </RootView>
    );
}
export default React.memo(Headline as FC<IProps>);
const RootView = styled(View)`
    &.Headline {
        margin-top: 40px;
        padding: 20px 30px;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        line-height: 1;
        .title {
            color: #333;
            font-size: 48px;
            font-weight: 600;
        }
    }
`;
